home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 119
/
(Vol 119) Nov 09 2010.iso
/
Games
/
tobby_ura_ura.swf
/
scripts
/
DefineSprite_79
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
1KB
|
49 lines
function main()
{
if(this.entryFlg == true)
{
this.hitCheck();
}
if(this.getFlg == false)
{
this.stageY = this.py - _root.baseY;
this.stageX = this.px - _root.baseX;
if(this.stageX < 0 || 640 < this.stageX)
{
this.entryFlg = false;
this._visible = false;
}
else
{
this.entryFlg = true;
this._visible = true;
}
}
}
function hitCheck()
{
if(this.hitTest(_root.tobbyMC) || this.hitTest(_root.handMC))
{
this.SE_kaito.start();
_root.getHosekiCnt = _root.getHosekiCnt + 1;
_root.getHosekiCntS = _root.getHosekiCntS + 1;
_root.gScore += 1048;
_root.numMainScoreMC.dispNum(_root.gScore);
this.entryFlg = false;
this.getFlg = true;
this.AnmMC.gotoAndPlay("kieru");
}
}
function unEntry()
{
this._visible = false;
}
this.px = this._x;
this.py = this._y;
this.anmMC.gotoAndPlay(_root.randomInt(40));
this._visible = false;
this.entryFlg = false;
this.getFlg = false;
this.SE_kaito = new Sound(this);
this.SE_kaito.attachSound("SE_kaito");